<?php
class View_Bug_Manager_Attachment extends CMF_Krypton_Core_View
{
	/**
	 *	Contructs HTML Output.
	 *	@access		public
	 *	@return		string
	 */
	public function buildContent()
	{
		$config		= $this->registry->get( 'config' );
		$request	= $this->registry->get( 'request' );
		$words		= $this->words['bug']['attachment'];

		$bug_id	= $request->get( 'bug_id' );
		if( $bug_id )
		{
			$ui	= $this->buildForm( 'bug', 'addAttachment', 'bug', 'attachment' );
			$button_add		= $this->html->Button( 'addAttachment', $words['button'] );
			$ui['field_button']		= $this->html->Field( '', $button_add );

			$ui['form']		= $this->html->Form( 'assignBug', "?link=".$request->get( 'link' )."&bug_id=".$request->get( 'bug_id' ), false, "multipart/form-data" );
			$ui['colgroup']		= $this->html->ColumnGroup( "30%", "70%" );
			$ui['caption']		= $this->html->TableCaption( $words['caption'] );
			$ui['heading']		= $words['heading'];

			return $this->loadTemplate( 'bug.edit_attach', $ui );
		}
	}
}
?>